Home > Archive > Matlab > July 2006 > 'default' not allowed in edit control?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
'default' not allowed in edit control?
|
|
| DavidRobbins 2006-07-31, 7:17 pm |
| running release 14 sp 3.
when i try:
set(control_handle,'String','default')
the string 'default' gets lost somewhere.
however doing any of these works:
set(control_handle,'String','default ')
set(control_handle,'String',' default')
set(control_handle,'String','Default')
Is this a known bug or should i just never try to set the text of an
edit control to 'default'.
| |
| Derek H 2006-07-31, 7:17 pm |
| DavidRobbins wrote:
>
>
> running release 14 sp 3.
> when i try:
> set(control_handle,'String','default')
> the string 'default' gets lost somewhere.
> however doing any of these works:
> set(control_handle,'String','default ')
> set(control_handle,'String',' default')
> set(control_handle,'String','Default')
>
> Is this a known bug or should i just never try to set the text of
> an
> edit control to 'default'.
Not entirely sure but it appears that default is a key word that
isn't available
| |
| DavidRobbins 2006-07-31, 7:17 pm |
| Derek H wrote:
>
>
> DavidRobbins wrote:
of[color=darkred]
>
why would they be checking the text to be displayed in an edit
control to see if it was a keyword??
>
> Not entirely sure but it appears that default is a key word that
> isn't available
it possibly is a key word... but i would not expect that the text to
be displayed in an edit control would be checked to see if it is a
keyword.
if i type in 'default' it does return it properly with the get of the
string property.
| |
| Doug Schwarz 2006-07-31, 7:17 pm |
| In article <ef3d093.1@webcrossing.raydaftYaTP>,
DavidRobbins <robbins@berkshire.net> wrote:
> Derek H wrote:
> of
>
> why would they be checking the text to be displayed in an edit
> control to see if it was a keyword??
>
>
> it possibly is a key word... but i would not expect that the text to
> be displayed in an edit control would be checked to see if it is a
> keyword.
>
> if i type in 'default' it does return it properly with the get of the
> string property.
Obscure MATLAB trivia.
'default' is a keyword (and the default is ''), so is 'factory'.
You can use '\default' (or '\factory'):
set(control_handle,'String','\default')
--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.
| |
| Steven Lord 2006-07-31, 7:17 pm |
|
"DavidRobbins" <robbins@berkshire.net> wrote in message
news:ef3d093.-1@webcrossing.raydaftYaTP...
> running release 14 sp 3.
> when i try:
> set(control_handle,'String','default')
> the string 'default' gets lost somewhere.
> however doing any of these works:
> set(control_handle,'String','default ')
> set(control_handle,'String',' default')
> set(control_handle,'String','Default')
>
> Is this a known bug or should i just never try to set the text of an
> edit control to 'default'.
Neither. Look at the last section on this page of the documentation:
http://www.mathworks.com/access/hel...s/hg_obj24.html
'default', 'remove', and 'factory' are special keywords when you try to set
a property of a Handle Graphics object to one of those strings. That page
tells you how to set the property to contain that explicit string.
--
Steve Lord
slord@mathworks.com
| |
| DavidRobbins 2006-07-31, 7:17 pm |
| Steven Lord wrote:
>
>
>
> "DavidRobbins" <robbins@berkshire.net> wrote in message
> news:ef3d093.-1@webcrossing.raydaftYaTP...
of[color=darkred]
> an
>
> Neither. Look at the last section on this page of the
> documentation:
>
> <http://www.mathworks.com/access/hel...s/hg_obj24.html>
>
> 'default', 'remove', and 'factory' are special keywords when you
> try to set
> a property of a Handle Graphics object to one of those strings.
> That page
> tells you how to set the property to contain that explicit string.
>
> --
> Steve Lord
> slord@mathworks.com
>
>
>
now that is interesting. this is going to be fun since the values i
an filling in could have been typed in by a user and saved in a mat
file in a previous run of the tool i am working on. i know 'default'
will be a common use of one text field, and 'factory' is another
possible use of that field that i hadn't tried yet.
so if i check just before the set command to see if the string is
'default', 'factory', or 'remove' and if so add a backslash before it
then i should be ok.
|
|
|
|
|