0

?page processing instruction not parsed correctly if attributes are enclosed in single quotes

asked 2009-02-05 10:34:28 +0800

cvarona gravatar image cvarona
554 1 6

Hi,

some time ago it had stroken me that any page style enclosed in single quotes was apparently ignored; now I've realised that if I write something like <?page id='something' ...?> desktop.getPages() yields [['something']] and desktop.getPage( "something" ) yields null; in other words, single quotes are parsed as belonging to the attribute text.

Can anybody confirm this?

With kind regards

César Varona

delete flag offensive retag edit

3 Replies

Sort by » oldest newest

answered 2009-02-09 00:47:31 +0800

flyworld gravatar image flyworld
155 3

can you provide your test code ?
i don't think the single quotes will be the issue :)

link publish delete flag offensive edit

answered 2009-02-09 14:56:10 +0800

cvarona gravatar image cvarona
554 1 6

Avec plaisir:

<?page id='main' ?>
<window title="My First Window" border="normal" width="200px">
  <zscript>
   String s1 = desktop.getPages().toString();
   p1 = desktop.getPageIfAny( "main" );
   p2 = desktop.getPageIfAny( "'main'" );
   String s2 = "p1: --" + p1 + "--, p2: --" + p2 + "--"; 
  </zscript>
  <label value="${s1}" />
  <label value="${s2}" />
</window>

With kind regards

César Varona

link publish delete flag offensive edit

answered 2009-02-11 01:07:22 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

well... i think this is a bug, coz we parse the attribute of <?page ourself
i post a bug in sourceforge.net
https://sourceforge.net/tracker2/?func=detail&aid=2587158&group_id=152762&atid=785191
you can follow this to get the solution :)

thanks.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-02-05 10:34:28 +0800

Seen: 166 times

Last updated: Feb 11 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More