Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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 |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
You can try and explore something like:
*|| m ||** **|m := StringMorph contents: 'Edit me'.|** **|m openInWorld.|** **|m launchMiniEditor: ActiveEvent|* Hilaire Le 09/06/2015 15:25, Jigyasa Grover a écrit : > 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. -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks HilaireFernandes
But am afraid it gives the error " Message Not Understood: receiver of 'hand' is nil " . |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Le 09/06/2015 18:04, Jigyasa Grover a écrit :
> Thanks HilaireFernandes > But am afraid it gives the error " Message Not Understood: receiver of > 'hand' is nil " . > > > > > -- > View this message in context: http://forum.world.st/Getting-a-user-input-string-using-Morphs-tp4831121p4831231.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > > I did with 3.0 -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Yes
I am currently developing it in Pharo 4.0 Thanks :) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The needed change for this low level access to morph is probably a small
one, related to ActiveHand, but I have not yet move to 4.0. In the other hand, you may want to use higher level approaches suggested by Pharo fellows. Hilaire Le 10/06/2015 09:20, Jigyasa Grover a écrit : > Yes > I am currently developing it in Pharo 4.0 > > Thanks :) > > -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Yep, still exploring ...
Thanks Jigyasa |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In reply to this post by HilaireFernandes
Yes hilaire ActiveHand as a global is a "bad concept"
In blog there is not globals anymore :) Le 10/6/15 10:54, Hilaire a écrit : > The needed change for this low level access to morph is probably a small > one, related to ActiveHand, but I have not yet move to 4.0. > In the other hand, you may want to use higher level approaches suggested > by Pharo fellows. > > Hilaire > > Le 10/06/2015 09:20, Jigyasa Grover a écrit : >> Yes >> I am currently developing it in Pharo 4.0 >> >> Thanks :) >> >> > ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In reply to this post by HilaireFernandes
On 09-06-15 20:10, Hilaire wrote:
> I guess you tried with Pharo4.0. > I did with 3.0 It is a difference between Workspace and GTPlayground. In GTPlayground, ActiveEvent is nil, so it doesn't work. In Workspace it works. launchMiniEditor: evt | textMorph | hasFocus := true. "Really only means edit in progress for this morph" textMorph := StringMorphEditor new contentsAsIs: contents. textMorph beAllFont: self fontToUse. textMorph bounds: (self bounds expandBy: 0@2). self addMorphFront: textMorph. evt hand newKeyboardFocus: textMorph. textMorph editor selectFrom: 1 to: textMorph paragraph text string size replace evt hand by ActiveHand to make it work in GTPlayground. Stephan |
Free forum by Nabble | Edit this page |