Search found 31 matches

by shakeshuck
Fri Jan 08, 2016 11:10 am
Forum: General Help
Topic: Debugger line stepping
Replies: 2
Views: 27484

Re: Debugger line stepping

I've worked out that I can get round this on a temporary basis by putting breakpoints on each line, but it's a bit of a pain...!
by shakeshuck
Fri Jan 08, 2016 7:17 am
Forum: General Help
Topic: Debugger line stepping
Replies: 2
Views: 27484

Debugger line stepping

Trouble is here again! :lol: In a previous post I had difficulty working out an issue due to the debugger (apparently) not line-stepping correctly. I have run into the same issue again. My low level of skill with regards to this language means I need to be able to step through my code line by line i...
by shakeshuck
Thu Jan 07, 2016 1:16 pm
Forum: GUI Toolkit & 2D Graphics
Topic: Clearing a float DataField
Replies: 4
Views: 86787

Re: Clearing a float DataField

After poking around a bit more, it seems the segfault was caused by casting the GetData request to float (the DataField was float).
Using String instead does not cause a failure, but the contents of the String are always either null or empty, regardless of what was entered in the field. :(
by shakeshuck
Tue Jan 05, 2016 6:06 pm
Forum: GUI Toolkit & 2D Graphics
Topic: Clearing a float DataField
Replies: 4
Views: 86787

Re: Clearing a float DataField

Hi Jerome, Instead of getting the user to do something "extra", I thought I'd see what happens during editing, so I set NotifyEdited on the ListBox to see what it showed. NotifyEdited gets called as soon as a number is hit, but trying to read the input using listBox.GetData(listBox.current...
by shakeshuck
Tue Jan 05, 2016 9:25 am
Forum: GUI Toolkit & 2D Graphics
Topic: Clearing a float DataField
Replies: 4
Views: 86787

Clearing a float DataField

Happy new year all. :D Unfortunately I'm back with another query...! I have a DataField in a ListBox with type float. It initially displays with no value (which is how I want it). After a value has been added, however, there does not seem to be a way to accept user input to clear the field again (em...
by shakeshuck
Thu Dec 17, 2015 5:10 am
Forum: eC Language
Topic: Numeric check
Replies: 7
Views: 48625

Re: Numeric check

Video sent, using same MakeActive sample as before...

Cheers. :)
by shakeshuck
Wed Dec 16, 2015 4:16 pm
Forum: eC Language
Topic: Numeric check
Replies: 7
Views: 48625

Re: Numeric check

If you set the data type to e.g. float for a ListBox field, the data will normally be displayed with the alignment you setup for that field. But only when editing that data, it will be left-aligned. That's what I thought, but it isn't doing that for me; with alignment set to center, centering (at d...
by shakeshuck
Wed Dec 16, 2015 11:04 am
Forum: eC Language
Topic: Numeric check
Replies: 7
Views: 48625

Re: Numeric check

You may also want to look into using a SavingDataBox with a data type set to float or double, which will automatically convert to numbers and reject invalid input. The input fields are ListBoxes; I did initially try setting the data type, but then discovered alignment doesn't work if you do. :( (Wi...
by shakeshuck
Wed Dec 16, 2015 9:21 am
Forum: eC Language
Topic: Numeric check
Replies: 7
Views: 48625

Numeric check

Hi again,

Is there an isNumeric for strings or something similar? FloatFromString needs some input vetting before it's used.

I can do it by hand, but just thought I'd ask as I would've thought a lot of folk would use it?
If I'm the first then of course I could be wrong... :lol:
by shakeshuck
Wed Dec 16, 2015 9:14 am
Forum: GUI Toolkit & 2D Graphics
Topic: Confused with code behaviour
Replies: 6
Views: 61218

Re: Confused with code behaviour

Hi shakeshuck, Holding the key down will generate additional OnKeyHit events. The first key down generates both an OnKeyDown, and if the input is allowed to continue (return true), an OnKeyHit. Try overriding OnKeyHit as well and returning false? Yup, that does it. You probably want to pass down in...