Hi ! I am new to Pharo and am currently working on making an Offline Text Search Application. I plan to use Morphs to make a nice GUI. Initially, I had thought of using TextMorphForEditView to get an input string from the user, but I feel this is not giving the desired functionality. Would be great if anyone could suggest a way to get input string from the user in the same window using an 'input text box' interface element. Regards -- View this message in context: http://forum.world.st/Getting-a-user-input-string-using-Morphs-tp4831122.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 09 Jun 2015, at 15:26, Jigyasa Grover <grover.jigyasa1@gmail.com> wrote:
Hi !
I am new to Pharo and am currently working on making an Offline Text Search Application. I plan to use Morphs to make a nice GUI. Initially, I had thought of using TextMorphForEditView to get an input string from the user, but I feel this is not giving the desired functionality. Would be great if anyone could suggest a way to get input string from the user in the same window using an 'input text box' interface element.
The easiest (but probably not the prettiest) solution would be to use input := UIManager default request: âplease type somethingâ¦â. That will handle the dialog for you. Even if itâs not exactly what you need, you might get some idea of how to go about it. You should also look into how itâs done in other places (e.g. the Monticello browser). Cheers, Max
Regards
-- View this message in context: http://forum.world.st/Getting-a-user-input-string-using-Morphs-tp4831122.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Hi Max :) The alternative works the way I want, but it doesn't integrate well with the UI I have started to make with the help of Morphs. PS- Can I use /UIManager/ 'stuff' to make the entire GUI for my application ? Regards -- View this message in context: http://forum.world.st/Getting-a-user-input-string-using-Morphs-tp4831122p483... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
If you don't need very specific control over the visuals of the UI I would highly recommend using Spec instead of Morphic. As for search, you can do something like ~~~~~~~~~~~~~~~~~~~ arr := #('Pharo' 'Squeak' 'VisualWorks'). c := EntryCompletion new dataSourceBlock: [ :currText | arr ]; filterBlock: [:currApplicant :currText | currApplicant includesSubstring: currText ]. m := TextInputFieldModel new. m entryCompletion: c. m openWithSpec ~~~~~~~~~~~~~~~~~~~ If you can describe in greater detail what exactly are you trying to achieve perhaps I would be able to give better hints. Cheers, Peter On Tue, Jun 9, 2015 at 5:46 PM, Jigyasa Grover <grover.jigyasa1@gmail.com> wrote:
Hi Max :)
The alternative works the way I want, but it doesn't integrate well with the UI I have started to make with the help of Morphs.
PS- Can I use /UIManager/ 'stuff' to make the entire GUI for my application ?
Regards
-- View this message in context: http://forum.world.st/Getting-a-user-input-string-using-Morphs-tp4831122p483... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Hi Peter I was planning to build something like this: <http://forum.world.st/file/n4831232/04.png> -- View this message in context: http://forum.world.st/Getting-a-user-input-string-using-Morphs-tp4831122p483... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (3)
-
Jigyasa Grover -
Max Leske -
Peter Uhnák