HeaderBar sample code is returning error

Test Driving NS Basic/App Studio…
When using your example to hide the Left HeaderBar button, this code —> $("#HeaderBar1>div:first";).hide()

Is returing this error --> Uncaught SyntaxError: missing ) after argument list. line 2 column 5

We are running that code in an onClick button event like this:
Button1.onclick=function(){
$("#HeaderBar1>div:first";).hide()
}
Can someone please help with this?

PS: Those smiley faces are semicolons. Not sure why they are showing that way here in the forum.

Some extra semicolons snuck into the documentation. It’s fixed now.

The correct usage is:

$(“#HeaderBar1>div:first”).hide()

George Henne
NS BASIC Corporation
http://www.nsbasic.com

Thanks for the quick reply, George.

We’ve been using XDK for quite a while now but Intel has deprecated
almost all the features down to something a tab more potent than Notepad
:confused:

NS Basic/App Studio is very nice. Just wish there was more info on how
to hook up Cordova CLI with it so we could compile our apps locally (for
free) instead of paying Adobe for their cloud building service. The docs
only briefly mentions “PhoneGap CLI” and we’re not sure that is exactly
the same thing, or how to get it working with NS Basic.

Thanks again.

John

Thanks for the kind words!

There is documentation on using the PhoneGap CLI here:

http://wiki.nsbasic.com/PhoneGap_CLI

Ok, it just BLEW away all the forms and controls we spent most of the
afternoon on. Saved the project every few minutes in case we screw up.
We moved a simple small image file and now the forms and controls are
just… gone. All we did was move a single image from the root of the
project into the images folder, then brought the AppStudio back to the
foreground and BOOM. Gone. We have the Toolbox list, the Project
Explorer but the forms are all gone. Center window is just showing a
blank page with code line #1.

Good grief. That sucked. I guess we’re on to Visual Studio next.

John

Run the project and have a look the Chrome Debugger. I’ll bet there’s an error message.

Let me know what you find. Nothing is lost - a problem with a control is probably screwing up others.

We can’t run the project. The run button was disabled as well as the run
menu option. Like half the AppStudio options were not available when we
re-opened the app. Quit and restart made no difference.

We already uninstalled everything. We cannot take the risk of losing hours
of work on production projects. Out clients would be pissed.

Thanks

John

Off hand, I can’t see how the Run button could get disabled. Can you zip your project directory and send it to us? I’d love to see what is going on.

Run was definitely disabled. As if the project was not completely
loaded. Will give it another go and see if we can reproduce the problem.
I did catch the error message in our clipboard (see attached), Could not
copy file [Errno 2].

These error messages indicate some file which your project is referencing, that cannot be found at runtime. Are they missing?

Umm Thanks. We gathered that was what the error meant. No, they were not
missing. Again, we used the Properties palette to set the image, a small
logo file. Then decided to create an “images” folder and dropped the
image there. When we switched back to App Studio, the error popped up.
We’re thinking… no problem, we will just change the image location in
the Properties settings. However, we were locked out at that point. We
could no longer access the Properties for that object no matter what we
tried. Run was disabled, Project explorer would not show the form at all
or the properties for any other object.

Opened the recent save, same issue. It opened up the project with
everything half disabled. Code window was also blank. Just freaked us
out a bit as this would be very bad news in a production environment.

John

It sounds like something has tied your shoelaces together!

This seems like a very odd state to be in. Could you zip your project folder and send it to me at support@nsbasic.com?

“This seems like a very odd state to be in.”.

You think??

Yes. I’d like to see what is going on with your project. Any chance you can zip the project folder and send it to me?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.