Author Topic: Odd - CLICKED value doesn't always reset  (Read 2983 times)

MrTAToad

  • Guest
For some reason, the following is always being executed :

Code: GLBasic [Select]
                        IF DDgui_get(self.LIST_STRINGS$,"CLICKED")
                                DEBUG "hh\n"
                                self.selectedLine%=DDgui_get(self.LIST_STRINGS$,"SELECT")
                                IF self.selectedLine%>=0
                                        DEBUG self.selectedLine%+"\n"
                                        DDgui_set(self.TEXT_STRINGETEXT$,"TEXT",self.strings[self.stringIndex%].lines[self.selectedLine%].name$)
                                        self.TStringEntry_EnableDisplayEntryArea(self.selectedLine%)
                                ENDIF
 

LIST_STRING$ is only pressed once, but for some reason CLICKED always returns TRUE

Now, EnableDisplayEntryArea is this :

Code: GLBasic [Select]
        FUNCTION TStringEntry_EnableDisplayEntryArea%:selectedLine%
                IF selectedLine%=self.INVALID%
                        DDgui_set(self.LIST_STRINGS$,"READONLY",FALSE)
                        DDgui_set(self.TEXT_STRINGETEXT$,"READONLY",TRUE)
                        DDgui_set(self.BUTTON_UPDATE$,"READONLY",TRUE)
                ELSE
                        DDgui_set(self.LIST_STRINGS$,"READONLY",TRUE)
                        DDgui_set(self.TEXT_STRINGETEXT$,"READONLY",FALSE)
                        DDgui_set(self.BUTTON_UPDATE$,"READONLY",FALSE)
                ENDIF
        ENDFUNCTION

Is it possible that SELECT is setting CLICKED ?

Aside from that the DDGui update seems okay...  :good:
« Last Edit: 2010-Aug-14 by MrTAToad »

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4977
  • O Rly?
    • View Profile
Re: Odd
« Reply #1 on: 2010-Aug-13 »
pls select a subject that match your post... (better for the searchfunction of this forum ;) )

I can't help you with your problem, never used DDGUI  :x
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

MrTAToad

  • Guest
Re: Odd - CLICKED value doesn't always reset
« Reply #2 on: 2010-Aug-14 »
I couldn't think of anything better at the time...  :S

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10667
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Odd - CLICKED value doesn't always reset
« Reply #3 on: 2010-Aug-17 »
if the selection of a list changes, a CLICKED will be triggered, yes.

MrTAToad

  • Guest
Re: Odd - CLICKED value doesn't always reset
« Reply #4 on: 2010-Aug-17 »
I think that must be the cause then...