News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
fl_ask
Author Message
roberts
Junior Member
**


Posts: 5
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 1
Post: #1
fl_ask

In murgaLua v0.4.1 one could easily use the fltk popup to ask a question as

response = fltk.fl_ask("your question here?")

This construct is used quite often in the many murgaLua scripts Damn Small Linux.

In murgaLua v0.5.5 it errors out with:
"attempt to call field fl_ask (a nil value)"

Is there an implementation change in v0.5.5 and moving forward concerning the use of popups?

I am aware of the implementation changes having to do with filesystem and that 0.5.5. now uses lfs. Is there other implementation changes that one should be made aware of?

11-09-2007 07:30 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #2
RE: fl_ask

Hi,

When I saw this post I thought I may have messed up, and forgotten to mention I removed fl_ask.

But if you look at the release notes on :

http://www.murga-projects.com/forum/show...hp?tid=147
or http://www.murga-projects.com/murgaLua/index.html

There is a line that mentions that fl_ask was removed.

This is because fl_ask is deprecated in FLTK ... They go as far as to say :

Quote:
Use of this function is strongly discouraged, and it will be removed in FLTK 2.0. Instead, use fl_choice() instead and provide unambiguous verbs in place of "Yes" and "No".

I am REALLY sorry this caused you problems, I wanted to tidy up all the deprecation messages in 0.5.5.

Cheers
JohnM

This post was last modified: 11-10-2007 02:57 AM by JohnMurga.

11-10-2007 02:56 AM
Visit this user's website Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #3
RE: fl_ask

I forgot to say ... I am particularly worried about changes that'll affect compatibility, so I will always pay special attention to these issues and make sure they are clearly stated in the release notes.

However, in terms of compatibility I think 0.5.5 WILL be the most painful release there ever was as I wanted to tidy up some things ... The changes going forward are more about new features, usability and stability.

Cheers
JohnM

11-10-2007 03:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #4
RE: fl_ask

For popups I think it's just fl_ask, at least at this point.

From the FLTK docs:

Quote:
Use of [fl_ask] is strongly discouraged, and it will be removed in FLTK 2.0. Instead, use fl_choice() instead and provide unambiguous verbs in place of "Yes" and "No"


couple of examples:

Code:
fltk.fl_choice("some text","choice3","choice2","choice1") -- default 2

Code:
fltk.fl_choice("some text",NULL,"choice2","choice1") -- default 2

Code:
fltk.fl_choice("some text","choice2","choice1",NULL) -- default 1


It's not quite as quick and easy as fl_ask, but is more flexible

11-10-2007 03:06 AM
Find all posts by this user Quote this message in a reply
roberts
Junior Member
**


Posts: 5
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 1
Post: #5
RE: fl_ask

Thanks for the reply and all your efforts with murgaLua.
I am off to update several scripts so I can get another release out.

11-10-2007 03:26 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: