Using field with "answer" dialog open
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Using field with "answer" dialog open
Hi,
I introduce myself I am an old italian HyperCard user landed in LiveCode, and I regret I speak English so badly, I hope you understand the meaning.
I need a hint, how can I scroll the field while I have "answer" dialog open ?
in the field, which I need to be able to scroll, there is the data that I need to enter in the "answer" dialog open.
i thank anyone who wants / can help me
Paolo
I introduce myself I am an old italian HyperCard user landed in LiveCode, and I regret I speak English so badly, I hope you understand the meaning.
I need a hint, how can I scroll the field while I have "answer" dialog open ?
in the field, which I need to be able to scroll, there is the data that I need to enter in the "answer" dialog open.
i thank anyone who wants / can help me
Paolo
Re: Using field with "answer" dialog open
Buongiorno e benvenuto nel LC forum, Paolo,
short answer: Questo non è possibile!
The ASK and ANSWER dialogs are opened as MODAL, which means they block everything until you close them.
What exactly do you need to do?
Maybe we can find another way to do this.
Best
Klaus
short answer: Questo non è possibile!
The ASK and ANSWER dialogs are opened as MODAL, which means they block everything until you close them.
What exactly do you need to do?
Maybe we can find another way to do this.
Best
Klaus
Re: Using field with "answer" dialog open
Yeh it sounds like a job for a substack to emulate the answer dialog, possibly as a palette to stay on top.
As Klaus says, anything modal, like the ask/answer dialogs, will by definitely block block everything until dismissed.
Having said that, this seems like atypical and strange interface, and possibly re-thinking the interface would provide a better answer...
As Klaus says, anything modal, like the ask/answer dialogs, will by definitely block block everything until dismissed.
Having said that, this seems like atypical and strange interface, and possibly re-thinking the interface would provide a better answer...
Re: Using field with "answer" dialog open
With the "Delete source" button of my application I interface with a field, in which are contained lines composed of, in order : code, name, surname, title. (of a text)
I would like to be able to implement the code to delete the exact line in the field that represents the text to be deleted (and therefore of its associated text tab and any many read tabs... but this part is solved).
In practice I do not find an elegant method to delete a row from a field, also because there are other functions that the field performs.
I hope I was clear and in right part of this forum
Thank you
Paolo
I would like to be able to implement the code to delete the exact line in the field that represents the text to be deleted (and therefore of its associated text tab and any many read tabs... but this part is solved).
In practice I do not find an elegant method to delete a row from a field, also because there are other functions that the field performs.
I hope I was clear and in right part of this forum
Thank you
Paolo
Re: Using field with "answer" dialog open
thanks stamstam wrote: ↑Thu Mar 14, 2024 6:53 pmYeh it sounds like a job for a substack to emulate the answer dialog, possibly as a palette to stay on top.
As Klaus says, anything modal, like the ask/answer dialogs, will by definitely block block everything until dismissed.
Having said that, this seems like atypical and strange interface, and possibly re-thinking the interface would provide a better answer...
actually the interface is to be rethought because it does not work for the features that you have illustrated to me.
The floating palette could also work, maybe if I don't find an easier method
Re: Using field with "answer" dialog open
Not sure I understand, do you mean that something like:
Code: Select all
...
delete line 42 of fld "your field in question here"
...
If yes, you can suppress these with:
Code: Select all
...
lock messages
delete line 42 of fld "your field in question here"
## more stuff here if neccessary...
unlock messages
...
Re: Using field with "answer" dialog open
Yes that is the method to delete the row, but wanting to do it with a click on the same row ? Or by searching the line by locating it through code search (or name, title...) and then delete it.Klaus wrote: ↑Thu Mar 14, 2024 7:39 pmNot sure I understand, do you mean that something like:will trigger some other commands/function in the script of your field?Code: Select all
... delete line 42 of fld "your field in question here" ...
If yes, you can suppress these with:If that is not what you mean, please explain.Code: Select all
... lock messages delete line 42 of fld "your field in question here" ## more stuff here if neccessary... unlock messages ...
(the code I need which address to go to delete also the text tab and the others associated) is a bit complicated to explain, but thanks all the same I will find the way
-
- VIP Livecode Opensource Backer
- Posts: 9751
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Using field with "answer" dialog open
Hi.
But, again as said, you can create a stack that looks exactly like the standard dialog (nicer if you like), and then you are free to do whatever you want. There is a little bit more that you have to pay attention to, but not much.
Craig
As others have said, you cannot do such "simple, ordinary" tasks with a modal dialog open. You are locked out.Yes that is the method to delete the row, but wanting to do it with a click on the same row ? Or by searching the line by locating it through code search (or name, title...) and then delete it.
But, again as said, you can create a stack that looks exactly like the standard dialog (nicer if you like), and then you are free to do whatever you want. There is a little bit more that you have to pay attention to, but not much.
Craig
Re: Using field with "answer" dialog open
Good morning
In the end I did as Stam had told me, which I thank.
I used a substack as a dialog window so that I would enter the code number to delete by choosing it from the index field. And the solution works very well.
Thank you very much to everyone for the contributions and the welcome.
Paolo
In the end I did as Stam had told me, which I thank.
I used a substack as a dialog window so that I would enter the code number to delete by choosing it from the index field. And the solution works very well.
Thank you very much to everyone for the contributions and the welcome.
Paolo
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Using field with "answer" dialog open
Do you want to delete a line when the user clicks it? The clickline function will tell you which line was clicked so you won't need a dialog. See "clickline" in the dictionary.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9751
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Using field with "answer" dialog open
Paolo.
Jacque makes a point. Never do something complicated when something simple will do.
The modal dialogs "Ask" and "Answer" both offer the user a choice of actions, and do something depending on the choice the user makes or the text the user supplies. Deleting a line by hand, as Jacque points out, can be much simpler, its action isolated in and limited to the line the user clicks on.
One click, no line. So?
Craig
Jacque makes a point. Never do something complicated when something simple will do.
The modal dialogs "Ask" and "Answer" both offer the user a choice of actions, and do something depending on the choice the user makes or the text the user supplies. Deleting a line by hand, as Jacque points out, can be much simpler, its action isolated in and limited to the line the user clicks on.
One click, no line. So?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9751
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Using field with "answer" dialog open
@Paolo.
The field must be locked for such activity. Is it?
@ Jacque.
If the field is not locked, it needs a kludge. One way is to place this in the field script:
Craig
The field must be locked for such activity. Is it?
@ Jacque.
If the field is not locked, it needs a kludge. One way is to place this in the field script:
Code: Select all
on mouseWithin
if the mouse is down then
delete line (word 2 of the mouseLine) of the target
wait until the mouse is up
end if
end mouseWithin
-
- VIP Livecode Opensource Backer
- Posts: 9751
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Using field with "answer" dialog open
The kludge, or another like it, is needed because in an unlocked field not too many common messages, like "mouseUp", are sent.
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Using field with "answer" dialog open
The dictionary suggests using selectionChanged to catch clicks in an unlocked field.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Using field with "answer" dialog open
I know the clickLine function, unfortunately the construction of my application is more complicated and difficult to explain, (especially with a machine translation (Do you understand well what I write?)) so it is not usable in this context. I tried to use it but to no avail.
However with the additional substack the function works, for me it is ok.
Certainly there will be a better way to do the task, but in the meantime if it works it is ok.
I started this application many years ago, in the meantime I use it, (so as not to lose data), and the versions are many with which I have eliminated problems and added or modified various functions.
Probably the real problem lies in the addressing mode of the index field, which is a bit crude, but works in a way without possible errors.
But as I said, the important thing is that it works.
Buona Serata
Paolo
However with the additional substack the function works, for me it is ok.
Certainly there will be a better way to do the task, but in the meantime if it works it is ok.
I started this application many years ago, in the meantime I use it, (so as not to lose data), and the versions are many with which I have eliminated problems and added or modified various functions.
Probably the real problem lies in the addressing mode of the index field, which is a bit crude, but works in a way without possible errors.
But as I said, the important thing is that it works.
Buona Serata
Paolo