Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Topic: Problem with 0.5.0 Release Candidate

You can post here problems you found with RC.

Changes in RC3:

- ADDED: beginasync, willasync and endasync events
- REMOVED : success and error events
- FIXED: text wrapping with <h2>
- FIXED: WA.Form doesn't require a form anymore is no form has to be processed
- FIXED: WA.Refresh now also updates header title and back button text is needed

Changes in RC4:

- ADDED: animated loader using PNG!! (based on background-image content and WA.Loader)
- CHANGED: new definition of .iMore (add a <span> to show the new loader)
- CHANGED: new definition of #iLoader
- CHANGED: optimize a lot the style images (now only 35K with more images, was 87K in 0.3.9)
- FIXED: .iFooter class (was hidden)
- FIXED: RTL styles
- FIXED: (partially) disapearing text occurring just before slide effect sometimes

Changes in RC4 Update 1:

ADDED: the default callback is now passed as parameter to custom callback using WA.Request
FIXED: loader indicator animation
FIXED: screen flicker in Safari while sliding on OS3.0
FIXED: broken mailto/maps... links in fullscreen mode
FIXED: links not working in dialog content (WA.Form)
FIXED: list selection state no proeprly reset in OS3.0 using media
FIXED: right span padding with media link

Changes in RC4 Update 2:

- FIXED: slide effect problem with OS3

Changes in RC5:

ADDED: way to change URL and parameters of async request using "beginasync" event
ADDED: disable new copy/paste feature of OS3 on most elements by default
FIXED: some links open in a new window in fullscreen mode even if there is no target attribute (regression)
FIXED: radio not properly checked from async if the target is not a layer and form tag is already in DOM (Safari bug)
CHANGED: iToggle action is now on full element instead of thumb only

Next release changes:

ADDED: async form submission now take care of the "method" attribute - not limited to POST anymore
ADDED: way to change the animation speed in CSS
ADDED: way to keep some header controls using WA.Header(...)
ADDED: no event raised if a parent <li> has __dis class
ADDED: disabled state for tab segments
ADDED: beginasync is now cancellable
ADDED: Version property
ADDED: a layer is automatically created if "document.webapp.autoCreateLayer = true"
CHANGED: iTab loader behavior, PNG animated loader is now possible
CHANGED: iLoader is not hidden anymore
CHANGED: iLoader is not absolute positionned anymore
FIXED: jumping keyboard in fullscreen mode (OS problem)
FIXED: inability to send tap on iForm element if it is not rasterized (Safari bug)
FIXED: scrim does really prevent events if it is not rasterized (Safari bug)
FIXED: header buttons remove/add synchronization when a top form is open
FIXED: javascript error with preload events if they use default context
FIXED: behavior of back/home methods
FIXED: previous scroll position is now reset when a previous layer is modified
FIXED: iTab selection if the content is not a text node
FIXED: stop propagation if event has to be canceled
FIXED: JS error may occur if an WebApp.Net event is sent before the framework is fully initialized
FIXED: Title not properly set upon refresh
FIXED: bug with embeded container using webkit transformation with a translate3d(...) parent (GoogleMaps in iLayer)
FIXED: reversed parameters with "endasync" event
FIXED: onsubmit not properly handled with WA.Form action button
FIXED: components of event context are now properly decoded

TODO: jumping/flickering layer while sliding with huge layer (http://webapp-net.com/Forums/viewtopic. … 1320#p1320)
TODO: parameters dynamically added in hash (http://webapp-net.com/Forums/viewtopic. … 1336#p1336)


Valty:

- There is a problem with iMenu / iArrow when there are many elements (+50): the interface becomes very slow.
- Adding an manual XmlHttpRequest on this big list makes many and many bugs when the request is done, and when we want to go back (1 to 5 seconds to wait before the "back" action takes effect).
- The addition of manual XmlHttpRequest is "flashing" the content of these requests in some cases, while with 0.3.9 there was no problem
- Sometimes, during an asynchronous request, the transition animation is not done and the content is displayed directly, probably because of the content.
This also occurred with previous version. This is a Safari related problem
- Sometimes, during an asynchronous request, the actual content (text) of the page flashes before switching to the next page
Yes, don't know why. This is related to the use of WebKit transition.
- With a iList <h2>, if the text is too long, the gray bar do not take 2 lines and the text overlaps the next iList element. (Mac & iPhone)
Not supposed to wrap. I'll fix this.
- fullscreen: Text fields (eg: for login) are strange where I touch them into the keyboard mode, even if the field is in the bottom of the page, the page goes back on top, and the field is not select. I need to tap the "Next" button in the keyboard mode to switch to the next text field.
- The <a> links with a target="ext" doesn't work (I think it's normal... but there is no solution currently to link to a .pdf, .doc, .txt, etc, like I can do with a rev="media" for QuickTime contents... I think it's THE big problem of WebApp.net :-)
- Cookies doesn't work anymore when I re-start my page. But it's not a WebApp.net problem I think !

Octav (#3):

- Potential problem with "load" event and/or WA.Header

Ed:

- problem with header and footer rendering
The header part has been changed a lot. If you just need to use a different color you can now use a simple

    #iHeader { background-color:green }

Also, #iFooter has been removed but you can still use .iFooter class. There is a know problem with it in the CSS. It is currently hidden by default. Add to your CSS:

    .iFooter { display:block }

- problem with onclick

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Re: Problem with 0.5.0 Release Candidate

Hello Chrilith !

Firstly, thank you for this excellent work. The RC2 is faster and pleasant than the 0.3.9.

Otherwise, the idea of making WebApp.net compatible with Firefox, IE, Opera and other browsers is very good.

Able to create themes is also something very interesting.

----

I noticed some problems:

- There is a problem with iMenu / iArrow when there are many elements (+50): the interface becomes very slow.

Adding an manual XmlHttpRequest on this big list makes many and many bugs when the request is done, and when we want to go back (1 to 5 seconds to wait before the "back" action takes effect).

- The addition of manual XmlHttpRequest is "flashing" the content of these requests in some cases, while with 0.3.9 there was no problem

- Sometimes, during an asynchronous request, the transition animation is not done and the content is displayed directly, probably because of the content.

- Sometimes, during an asynchronous request, the actual content (text) of the page flashes before switching to the next page

EDIT : Problems only on the iPhone's Safari. On the Mac Safari, all is okay.

EDIT 2 : With a iList <h2>, if the text is too long, the gray bar do not take 2 lines and the text overlaps the next iList element. (Mac & iPhone)

EDIT 3 : Many bugs in fullscreen mode :

- Text fields (eg: for login) are strange where I touch them into the keyboard mode, even if the field is in the bottom of the page, the page goes back on top, and the field is not select. I need to tap the "Next" button in the keyboard mode to switch to the next text field.

- The <a> links with a target="ext" doesn't work (I think it's normal... but there is no solution currently to link to a .pdf, .doc, .txt, etc, like I can do with a rev="media" for QuickTime contents... I think it's THE big problem of WebApp.net :-)

- Cookies doesn't work anymore when I re-start my page. But it's not a WebApp.net problem I think !

----

A question: Are you French ? I want to show you my project, but it is only disponible in French.

I think that my project will show to you many bugs of your micro framework, because it's really big (~100 pages, many cases of utilisations of WebApp.net)

If you want more informations, tell me and I will send to you a PM !

EDIT 3 : Sorry for the big post, but nobody have reported this kind of problems !

Last edited by Valty (2009-02-22 14:53:43)

Re: Problem with 0.5.0 Release Candidate

Hello!

I also have a problem with the new version : the AddEventListener function
seems not to work properly with 0.5.0.

Here is the code I used, in the html head of my first page (with waHome as
first layer) :

<script type="text/javascript">

    WA.AddEventListener("load", LoadingTab);
         
    function LoadingTab(evt) {
         WA.Header(0, "tab1");
    }

</script>

With 0.3.9a, my tab bar was displayed fine in the Header. I haven't changed
the code, and it unfortunately isn't displayed with 0.5.0. Is it a bug? Or can
I do something to fix that?

Thanks a lot!

4

Re: Problem with 0.5.0 Release Candidate

I can't use 0.5.0 in its current state for my project. A lot of things have been broken.

The footer/header is broken and displayed incorrectly. And it displays differently in different browsers. I know it shouldn't be a problem if the app is only going to be viewed on the iPhone Safari, but I need to be able to develop it somehow. It's a pain if I can't use Firefox and FireBug to develop it.

There's so little documentation about the changes, it's horrible. You say you've changed the loader behaviour... How? What do I need to change to make it work? I can't look at the demo source code because it's changed by Logic.js duynamically. And the new demo's source code hasn't been released.

And stop messing with javascript return statements. Or at least write some documentation about how they should work. My onclicks have been broken in the new release. I can't make buttons do what I want them to.

Sometimes it seems that too much css is being generated by Logic.js. You're trying to make it simpler to develop the pages, but you're overriding custom styles and behaviour. I really like how webapp handles page transitions and all those nice lists, but there should be more control over it. I shouldn't be made to change or override your framework code to do things I want to.

Re: Problem with 0.5.0 Release Candidate

Hello Ed,

WebApp.net is the basis for works only on WebKit derivatives browsers. The 0.3.9 only works with Safari, Chrome, WebKit, etc...

With the 0.5.0 RC2, there is a small CSS that allows working with FireFox (header readjustment). But the display is not good because Firefox does not support CSS WebKit instructions (for borders and buttons).

Is it really a problem ? WebApp.net is a micro-framework designed for mobile working, and just works with iPhone, Androïd, WinMo Opera (poorly... but it's WinMo) and maybe with the future "mobile FireFox".

For the documentation and the demo... the 0.5.0 is a release candidate... not a stable version. But I agree that it is difficult to identify new things without this.

Maybe you should wait for the final version ! :-)


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 684

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Re: Problem with 0.5.0 Release Candidate

ed wrote:

There's so little documentation about the changes, it's horrible. You say you've changed the loader behaviour... How? What do I need to change to make it work? I can't look at the demo source code because it's changed by Logic.js duynamically. And the new demo's source code hasn't been released.

If your are talking about #iLoader - if not what' are you taling about and what is the problem you have?

ed wrote:

And stop messing with javascript return statements. Or at least write some documentation about how they should work. My onclicks have been broken in the new release. I can't make buttons do what I want them to.

onclick were very buggy with previous version of WebApp.Net - real support for it has been added to this version.
Could you please explain the problem you have and what you mean by "And stop messing with javascript return statements."


ed wrote:

Sometimes it seems that too much css is being generated by Logic.js. You're trying to make it simpler to develop the pages, but you're overriding custom styles and behaviour. I really like how webapp handles page transitions and all those nice lists, but there should be more control over it. I shouldn't be made to change or override your framework code to do things I want to.

Logic.js doesn't generate any CSScode but of course it add some classes on elements (__sel, __lod...). What you mean by "you're overriding custom styles and behaviour"?

Thanks

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Re: Problem with 0.5.0 Release Candidate

To everyone, please, provide me with a sample code who shows the problem you met on the forum if it is small or send me an email with a link to the problem

Thanks!

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

8

Re: Problem with 0.5.0 Release Candidate

Sorry about the rant. I was annoyed with not being able to get the new version to work. I will try to write a decent post about the issues I'm having.

Re: Problem with 0.5.0 Release Candidate

Ok thanks, for the info, the first post will be updated according to your answers and what have been fixed.

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 684

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

10

Re: Problem with 0.5.0 Release Candidate

Chrilith wrote:

Ok thanks, for the info, the first post will be updated according to your answers and what have been fixed.

The site I am trying to migrate to the new version is http://www.sccope.com/iphone.

So here's the list...

There is no documentation on how to exactly define the new iHeader. The demo has some examples, but I can't be sure if some of that stuff wasn't generated by the framework later.

I am currently using a custom iHeader with a logo image. My js overwrites the default header (page title) with my custom one on every page. Problem is, the image is bigger than the header. And there is also some text under it., which I could include in the image to make it easier.
So I have to change the height of the iHeader. And the colour. I can do both of those things, and resize the default background-image to fit the header size. The image appears if I replace the title with an img tag, but it's not centred vertically and all that. It's not really your fault, but maybe that could be a feature request - to be able to replace titles with images in a nice way.

I also have an iRightButton in the iHeader. It toggles a custom menu when clicked, which appears just below the header, over the content. The button has an onclick event to toggle the menu. For some reason the event is fired twice when I click on the button. So the menu is shown and instantly hidden. Could you write something about how to define the onclicks in the new version properly? Also the menu layout is all wrong, but that's something I have to fix.

The back button work fine, but it's colour gets all white when it's sliding. Not sure if that happens on the iPhone. Doesn't happen in your demo. Maybe it's just Chrome doing funny stuff.
http://i40.tinypic.com/205vyo2.png

The new HTML header needs some documentation. Do I have to include the theme and firefox css files? I am worried about firefox just because I use it when developing. Also Chrome. Neither my webapp or the demo work in IE. Could be a problem if some new touch-enabled Windows Mobile phone wants to use the iphone webapp.

Would it be possible to make the iFull image class not stretch the image, only center it horizontally and vertically if it's smaller? I currently have to use a custom span to do that.

I am using some of the buttons to open a new window with _blank. I want a javascript return false when that happens. In the old version the framework overrode the return and returned anyway. Not sure if that's fixed now. I had to do an onclick and window.location to make it work. Also a javascript prompt where the user is asked something, but they can also cancel and not go to the href.

I noticed that you're using a lot of !important in the render.css. Is that good? Because if I want to override it, I have to use !important again in many cases.

If you need any specific code examples, please ask. Couldn't be bothered to include an example for everything here. You can also look at the site code if you want.

Overall, I think your framework is the best of the ones currently out there. Lots of good things in it. And lots of good things that can still be added.

Re: Problem with 0.5.0 Release Candidate

For your logo:

You can put it in your "waHeadTitle" container and then use CSS to adjust its top position:

#waHeadTitle img { position:relative; top:-5px }

Like this your logo will be centerer and properly positioned (adjust the top value, of course wink)
For the background, you don't need to make your own anymore, just use "background-color" as explain earlier. You can also use background-image if you want your logo to not move while sliding.

I'll check the onclick problem.

Could you explain what you've done regarding menu problem?

Don't know about back button and Chrome. AFAIK, even if it is a release, it is not so stable.

Theme let you know what you can change to customize the colors, not required, only an incomplete sample. Firefox is here to fix some presentation with this browser. For dev purpose only. WebApp.Net doesn't work on IE because it use a non standard javascript engine and lakes of many CSS features support.

Target is supposed to be fixed in this version and onclick internally handled - so everything should work nice with this version.

!important directive makes things easier but I try to prevent its use as much as possible. I use it only when I have no other choice.

Thanks a lot!!!

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Re: Problem with 0.5.0 Release Candidate

Sorry, my answer is a bit late. Actually, I found the solution, or rather an explanation : I had a link to another javascript function in the html head of my webapp first page (so in xhtml):

WA.AddEventListener("load", Redirection);
 
function Redirection(evt) {
 
 var anchor = x_document.location.hash;
 
 if ( anchor == "#_Part1")
 {
  var url = "/iphone/fr/Part1/index.html";
 }
 else if ( anchor == "#_Part2")
 {
  var url = "/iphone/fr/Part2/index.html";
 }
//...
 else
 {
  //do nothing
 }
 
 WA.Request(url, null, -1);
}

This code was put in the html code before the following, which was called before I updated WAn and not any more after that :

<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
        ....
 <!-- link to the before-mentioned function-->
        ....
 <SCRIPT type="text/javascript">
 
  //this zone is always called on page load
 
  WA.AddEventListener("load", LoadTab);
 
  function LoadTab(evt) {
   //this function is only called on page load with the 0.3.9a version, not the 0.5.0
   WA.Header(0, "tab1");
  }
 
 </SCRIPT>
</HEAD>
<BODY>
 ....
</BODY>

So, it seems that only one javascript function can be called just after the page loads with WAn's new version. Is it true? Can we change this? I've found that when I disabled the first part of the javascript code the knotty part of code was well called, so it is approximately solved.

Could it be possible to have a preciser description of the code update with the new version? And access to a more human-readable Logic.js, as in the Debug folder of the previous release?

Thanks.

Re: Problem with 0.5.0 Release Candidate

Hey Chrilith:

Here is some code that shows a "jumping" page bug.
I tried to remove more ul's and li's, but then the bug would go away.
My guess is it has something to do with header buttons, since WebApp
"jumps" up and down a set height.  But that's a total guess.
(Sorry about formatting, cut&paste from linux does that;) )
BTW, is there a debug version of V0.5.0RC2, so we can help debug?

<html>
<head>
  <title>WebAppV0.5.0</title>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <link rel="Stylesheet" href="WebAppV0.5.0/Design/Render.css" />
    <script type="text/javascript" src="WebAppV0.5.0/Action/Logic.js"></script>
</head>
<body -dir="rtl"><div id="WebApp">
<div id="iHeader">
    <a href="#" id="waBackButton">Back</a>
    <a href="#" id="waHomeButton">Home</a>
  <a href="#" onclick="return WA.HideBar()"><span id="waHeadTitle">Bug Demo</span></a>
</div>
<div id="iGroup">
  <!-- Home -->
    <div class="iLayer" id="waHome" title="Home">
        <div class="iMenu">
      <h3>Title</h3>
            <ul class="iArrow iShop">
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
            </ul>
      <h3>Title</h3>
            <ul class="iArrow iShop">
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
            </ul>
      <h3>Title</h3>
            <ul class="iArrow iShop">
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
            </ul>
      <h3>Title</h3>
            <ul class="iArrow iShop">
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
            </ul>
      <h3>Title</h3>
            <ul class="iArrow iShop">
        <li><a href="#_Simple"><img src="Demo/Img/image.png" class="iFull"/></a></li>
            </ul>
        </div>        
    </div>
  <!-- Simple List -->
    <div class="iLayer" id="waSimple" title="Simple List">
        <div class="iList">
            <h2>Title</h2>
            <ul class="iArrow">
                <li>This item has no link</li>
            </ul>
        </div>
    </div>
</div>
</div></body>
</html>

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 684

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

14

Re: Problem with 0.5.0 Release Candidate

Chrilith wrote:

Could you explain what you've done regarding menu problem?

My iHeader looks like this in the old version:

<div id="iHeader">

<a href="#" id="waBackButton">Back</a> 
<a href="#" class="iRightButton iBClassic" onclick="return toggleAct();">More</a>

<div id="waHeadTitle">
<a href="#" onclick="return WA.Home();"><img src="logo.png" alt="Logo" /></a>
<br /><span class="tagline">Some text!</span>
</div>

<div class="iForm" id="actionsForm" style="display:none;">
<a id="button1" class="iFormButton" href="#" onclick="return doStuff1();">Press me</a>
<a id="button2" class="iFormButton" href="#" onclick="return doStuff2();">Press me</a>
<a class="iFormButton" href="Layer/about.xml#_About" rev="async">About</a>
</div>

</div>

When the More button is clicked, it should call the toggleAct() function:

function toggleAct()
{
var elem = document.getElementById("actionsForm");

if (elem.style.display == "none")
elem.style.display = "block";
else
elem.style.display = "none";
}

The problem is that for some reason the onclick is fired twice in the new version, thus showing and instantly hiding the menu.
This is not all my code, it wasn't my decision to make the menu an iForm. Maybe there's a better way to do it.
Also, toggleAct() does a bit more than just showing and hiding the menu. It also shows and hides a shadow div over the content, but I didn't include that code because that's not the problem.

Re: Problem with 0.5.0 Release Candidate

incaic: yes, the flicker problem is related to the scroll-to-top effect - this is more a safari bug but I'll try to find a workaround

ed: For the header, using what I gave you in previous post should work. To disable the click you need to return false in your toggleAct() - this will fix the problem but in fact it seems there is a bug when false is not returned. Since it is handled by WAn and classic behavior too.

FYI, with or without WAn, using onclick, you need to return false else, the link will be executed and if you have a href pointing to something else than "#" you go to the URL. This is the same thing used by the "confirm" javascript function. Also, using "#" you'll jump to the top in some browsers if you don't return false because # is an anchor to the current page and the scroll position is reset.

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 684

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

16

Re: Problem with 0.5.0 Release Candidate

Chrilith wrote:

ed: For the header, using what I gave you in previous post should work. To disable the click you need to return false in your toggleAct() - this will fix the problem but in fact it seems there is a bug when false is not returned. Since it is handled by WAn and classic behavior too.

Sorry, forgot to add that bit of code to the example. There is a return false; at the end of the function. And I've found that in some cases WA doesn't take that return into account and overrides it. So I've had to add an onclick to an anchor and remove the href completely.

For example, there is an anchor with an href that points to an external site which will open in a new tab in safari. It has an onclick that asks the user if they want to go there or not. If the user chooses yes, it should open it with return true. If no, it should return false and nothing should happen. But that doesn't work. It still opens the link.

And when it does open it, it changes the button to blue, as it should be. At least in the old version. But I don't think it changed it back to whatever it was when I go back. Maybe that only happened when I added rev="async" in an effort to stop it from returning.

Last edited by ed (2009-03-03 16:38:41)

17

Re: Problem with 0.5.0 Release Candidate

Noticed something strange...

I have an onload event on the body tag:

<body -dir="rtl" onload="SetupApp();">

It's supposed to add event listeners:

function SetupApp()
{
    WA.AddEventListener("beginslide", OnBeginSlide);
    WA.AddEventListener("load", OnLoadPage);
}

Problem is, I can't get the OnLoadPage function to fire in any way. In the old version it used to fire when I reloaded a page. Now it doesn't.

Re: Problem with 0.5.0 Release Candidate

Instead of onload, try:

addEventListener("load",SetupApp,true);

Last edited by incaic (2009-03-05 19:37:27)


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 684

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

19

Re: Problem with 0.5.0 Release Candidate

incaic wrote:

Instead of onload, try:

addEventListener("load",SetupApp,true);

SetupApp isn't the problem. That works. What didn't work is adding the OnLoadPage event listener.

Are they both doing the same thing? Is the load event actually overwriting the body's onload event? Is that why you suggested this?
And what does the true mean?

Re: Problem with 0.5.0 Release Candidate

Ed, in your example OnLoadPage is never called because the WAn "load" use window.addEventListener and is called before the body onload. You can verofy this easily using alerts or console.log to find the call order.

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Re: Problem with 0.5.0 Release Candidate

Ed, I also wasn't able to reproduce youronclick problem. If you look at the demo, you'll see that there is a "search" button using onclick and the form is not shown and immediately hidden.

Looking at your code, I don't understand why you waste time changing buttons and hidding __wa_shadow when this is fully and automatically supported by WebApp.Net using WA.Form (ShowAct/HideAct). Of course your code currently needs to have a form around in order for it to work.... but I'll change this.

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Re: Problem with 0.5.0 Release Candidate

WA.Form has been changed in RC3 - let me know if you need help using it to remove your ShowAct/HideAct.

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 684

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

23

Re: Problem with 0.5.0 Release Candidate

Chrilith wrote:

Looking at your code, I don't understand why you waste time changing buttons and hidding __wa_shadow when this is fully and automatically supported by WebApp.Net using WA.Form (ShowAct/HideAct). Of course your code currently needs to have a form around in order for it to work.... but I'll change this.

Thanks. I didn't write that part of the code, but I'll see if I can make it better.


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/24/d260627385/htdocs/chrilith.com/forums/include/parser.php on line 738

Re: Problem with 0.5.0 Release Candidate

Hello Chrilith,

The RC3 have many and many bugs with my WebApp :

- The header buttons are not working (and are not displayed at all), only the first time. After a jump to another layer + back, there are working good.

- The slide effect does not work with async links (Safari Mac + iPhone fw 2.2.0)

- Bugs with <li><input type='checkbox' name='xxx' class='iToggle' title='OUI|NON' checked='checked' value='ok'> <label for='xxx'>Title</label></li>

and maybe more, just tested for 5 minutes... I don't understand why it's not working good with the RC3.

------

I will give you in few days a full test access on my WebApp. You will view many bugs I have said before.

Re: Problem with 0.5.0 Release Candidate

well, really weird. There are only few changes in this version and nothing on slide effect, buttons or switch.... I've tested the content of the archive with the current demo (the old one) and I have no problem.

We need Amazon reviewers. Please do one!
Book: "Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript" Buy Now! (or review).
/!\ Don't forget to "Like" WebApp.Net from the homepage