Ask a Question related to Mac Programming, Design and Development.
-
Steven Walker #1
Edit Text Field Not Working in OS9
Hi Everyone,
I have spent a few hours on this problem and can't figure out how to
fix this.
I have a dialog box that gathers basic user registration information.
The dialog is invoked from within a shared library and runs a
ReceiveNextEvent() loop to temporarily block out the host. In OSX,
everything works fine. However, running in OS9 (or Classic) the edit
text fields no longer work. The dialog and controls display fine and
all the buttons work, but I can't click or type in any of the edit
fields.
Does anyone know why this is? I thought it may be related to using
ReceiveNextEvent, but my dialog handler function is being called.
Do I need to install event handlers for each edit text box? Or do I
need to propogate the events manually?
Thanks for any input! :)
Steven Walker
[email]steve@walkereffects.com[/email]
Steven Walker Guest
-
Text edit functions not working for text entry fields onMAC
In all the text-entry fields - one cannot cut, copy, paste, nor perform other normal text edit functions on MAC using Firefox. Any idea about the... -
Defined text field in form -> subject field in e-mail
Hi, I have a form on my web site which users send to me by mailto-function. I would like the text they write in a particular text field to... -
Radio btn makes text field equal value of different text field
What I am trying to do is when someone clicks on the YES radio button I want the text field called MYTEXT to equal the text field named DATE. The... -
list component working with dynamic text field
Hey guys, I'm building a list component for my shopping cart that adds and deletes items in the box. I know how to script adding the labels, but... -
Linking date field to text field entry
Is there a way to setup a date field that will automatically enter the date when any information is entered into a field next to it? -
Uli Kusterer #2
Re: Edit Text Field Not Working in OS9
In article <80ce5172.0308280748.7bb9de18@posting.google.com >,
[email]steve@walkereffects.com[/email] (Steven Walker) wrote:
Do you have any other objects overlapping (above *or* below) that item?> I still can't figure this out. I have tried everything I can think
> of... installing event handlers, removing event handlers, isolating
> the control, sending events. But nothing works, the text edit field
> just does not respond to user interaction.
That's not really supported by the Control manager, and may thus cause a
few problems.
You might also want to check whether any of the fields is disabled,
whether it is embedded/auto-embedded in any other control that may be
disabled, things like that...
Have you tried whether it makes a difference to call WaitNextEvent()
instead of ReceiveNextEvent()? It may be that the EditText control still
uses classic events on 9... I don't think the implementation of TextEdit
in Carbon/9 is any different from the one in Toolbox/9.
Finally, are you sure it doesn't react, or do you just fail to see the
results? Are you messing with clipping rects/regions in any way? Is this
in a DialogRef or in a "straight" WindowRef?
Just a few thoughts.
-- Uli
[url]http://www.zathras.de[/url]
Uli Kusterer Guest
-
James W. Walker #3
Re: Edit Text Field Not Working in OS9
In article <80ce5172.0308301342.5c7778ec@posting.google.com >, Steven
Walker <steve@walkereffects.com> wrote:
Just a wild guess, maybe you need to call CreateRootControl before the> As a test, I created a project from scratch using the C++ Toolbox
> Carbon stationary. I replaced the default code with my own to
> dynamically create a window with two controls: a button and a text
> edit field (there are no resources). I installed no event handlers
> (because the default behavior should work).
>
> Then I tried using both WaitNextEvent() and ReceiveNextEvent(), and
> they produce identical results: the window appears, the button works,
> but the text field does not in OS 9. In OSX everything works fine.
>
> In the chance that someone can see my blunder, the code is below
other controls.
James W. Walker Guest
-
Steven Walker #4
Re: Edit Text Field Not Working in OS9
Thank you James and Uli, it was the root control! After putting in
those two lines of code, it all works!!!
I did not know about the root and would have never thought to look for
it. Apparently, the root control is built-in to windows in OSX but not
in OS9.
Oddly, one of Apple's tech notes confirms that I was doing this right:
[url]http://developer.apple.com/qa/qa2001/qa1215.html[/url]
Excerpt from QA1215:
"If you create controls in your window with the CreateFooControl APIs
and pass a valid window parameter, then a root control will be
automatically created for you, as in the past, so you don't need to
call CreateRootControl yourself "
Though apparently this is wrong as my little experiment just showed.
For brevity of the example I removed all error handling. I could use> What are you trying to achieve with this code? Why don't you use
> RunAppModalLoopForWindow() or some other method intended for doing modal
> dialogs? And what does SendEventToEventTarget() return? Does it give you
> any errors?
RunAppModalLoopForWindow(), but I most often create my own loops to
have more control. In this example it doesn't matter which is used.
Thanks again, this fix has made my day!
Steven J. Walker
Steven Walker Guest



Reply With Quote

