Dynamic Objects in Delphi (Basics)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 26

  • @darkflash9729
    @darkflash9729 4 ปีที่แล้ว +5

    Thanks man i struggled for like an hour

    • @denriquegouws8932
      @denriquegouws8932 3 ปีที่แล้ว

      Awe ulrich😂 Ek vat dit jy sukkel ook💀

    • @darkflash9729
      @darkflash9729 3 ปีที่แล้ว

      @@denriquegouws8932 ja bra gelukkig bestaan youtube🤣

  • @Janvanderkloes
    @Janvanderkloes 4 ปีที่แล้ว +1

    But What is the bennefit of this dynamic button ? becouse its more code then use a static one

    • @Zero_69420
      @Zero_69420 4 ปีที่แล้ว +5

      It uses alot less resources than having everything made when it your program launches lets take a game for example, it is massive and instead of loading all th caves you want to explore before you create it dynamically and only create it when the player gets close to it, less resources used = smoother and faster loading times

    • @achilles4625
      @achilles4625 3 ปีที่แล้ว

      I found it more useful to use dynamic objects because it gave me more control of the values instead of having the values already set

  • @joyfulmbokazi6905
    @joyfulmbokazi6905 2 ปีที่แล้ว

    can a dynamic button function like a normal button or is it meant to carry out simple tasks?

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว

      You can write any code in a dynamic button that you would for a static button

    • @joyfulmbokazi6905
      @joyfulmbokazi6905 2 ปีที่แล้ว

      @@MrLongITandCAT I tried to use the dynamic button to write to a textfile but it's not working

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว

      @@joyfulmbokazi6905 Does it not create the button or does the button not do what you want it to do?

    • @joyfulmbokazi6905
      @joyfulmbokazi6905 2 ปีที่แล้ว

      @@MrLongITandCAT the dynamic button doesn't do what it's supposed to do
      It only works with show message

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว

      @@joyfulmbokazi6905 Can you show me the code of the dynamic button?

  • @jeronarendse
    @jeronarendse ปีที่แล้ว

    When I try to create the procedure, it says unsatisfied internal or external declaration. What does this mean?

    • @MrLongITandCAT
      @MrLongITandCAT  ปีที่แล้ว

      Do you have a sender : TObject parameter in your procedure?

  • @beancagovender4709
    @beancagovender4709 2 ปีที่แล้ว

    Would this dynamic object code work for a form?

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว +1

      You can create forms dynamically. Here is an article which may help you: docwiki.embarcadero.com/RADStudio/Sydney/en/Creating_Forms_Dynamically

  • @tirt
    @tirt 2 ปีที่แล้ว

    If you click the "create a button" button again, it doesn't override the button it just errors. Anyway to make it not error and rather override it?

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว +1

      You can try adding the code btnTemp.Free ; as the first line of code so that it removes any previously created buttons before trying to create a new version.

  • @vuyanitause6534
    @vuyanitause6534 2 ปีที่แล้ว

    Can I use this dynamic object to go to other forms?

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว

      Yes. Go look at our videos on MultiForms and use the code from those videos in your dynamic button.

  • @fouadouchene529
    @fouadouchene529 4 ปีที่แล้ว

    How do I save it, because when I close the application the button disappears

    • @gr6666
      @gr6666 2 ปีที่แล้ว

      It's a runtime button, not a design time button. That's why its "Dynamic". However... he could have set the owner as the form when creating it and you could have another button to "free" it as well... so it really is temporary.

  • @turodo5219
    @turodo5219 4 ปีที่แล้ว +6

    Yay urethra xD