Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newbie help with Tweego for your Examples? #3

Open
arnicas opened this issue Feb 10, 2021 · 6 comments
Open

Newbie help with Tweego for your Examples? #3

arnicas opened this issue Feb 10, 2021 · 6 comments

Comments

@arnicas
Copy link

arnicas commented Feb 10, 2021

Hi Josh - sorry, but when I try to compile the way you do in your videos with tweego, I get errors in the resulting html file saying macros or widgets aren't defined.

tweego -o local1.html localvore.tw common/

Adding: the error in this output file is: Error: cannot execute widget <>: unable to parse macro argument expression "QBN.cards().sort(QBN.alphabetically)": QBN is not defined

Is including common not sufficient?

This is tweego 2.1.1 on a mac? Any ideas? Thanks...

@JoshuaGrams
Copy link
Owner

Huh. I'll have to dig into that a bit. I haven't seen that error, and I just did a clean download of the repository and ran the command with tweego 2.1.1 on Windows 10 and it seems to work.

One of my brothers does have a Mac mini: I'll try installing Twine and Tweego on there and see if I can reproduce it, but that'll probably be this evening or tomorrow morning.

Hmm...QBN is not defined...so either Tweego is somehow not putting the JS in there, or there's a syntax error in the JS, which I don't think I've had recently, so you shouldn't have a version that I accidentally pushed with a bug in it...

Can you attach the HTML file? You should just be able to drag-and-drop it onto a reply here. I don't know if I'll be able to tell anything from it, but it's worth a look.

@JoshuaGrams
Copy link
Owner

Oh...I'm such an idiot. Copy examples/common/tiny-qbn.tw to examples/common/tiny-qbn.js (so there's a copy named .js and not just the .txt one).

Or I fixed it in the repository, so you could just pull the changes (assuming you're using Git rather than having downloaded it as a zip file).

Sorry about that. Messed it up when I was trying to get the blank-project-builder to work, and my build process makes it work for me anyway so I didn't catch it. And then I told Git to hide it from me. So yeah. Wasn't thinking that day, I guess.

@JoshuaGrams
Copy link
Owner

Er. I closed this out of habit, because I'm 99% sure that my sloppy mistake was the problem, but you should definitely reopen it if that doesn't fix it for you.

@arnicas
Copy link
Author

arnicas commented Feb 15, 2021

Ugh, sorry, I took the weekend off from the computer. But I'm still having issues. I pulled your latest, and used the same command to run tweego: tweego -o local.html localvore.tw common/

And there is still lots of erroring. Attaching the generated html with a .txt addition so it can be attached...

local.html.txt

@JoshuaGrams JoshuaGrams reopened this Feb 15, 2021
@JoshuaGrams
Copy link
Owner

No, it's just as well: in the meantime I found an issue where the javascript minification/compression was breaking the code and sending it into an infinite loop and also breaking Internet Explorer, and who knows how long those have been there. I really need to figure out how to run automated tests on this stuff so I stop missing bugs that are triggered by my examples.

OK. I'm afraid I'm not seeing the errors. I downloaded your file and tried it on the Mac Mini with Safari, Chrome, and Firefox, and clicked through all the features of that example, and it works fine. The only place I could break it was with Internet Explorer 11 on Windows.

Hrm. I guess...what errors are you seeing? Still the <<cardrow>> ... QBN is not defined one? What else? What browser, what OSX version (the Mac Mini is still on Mojave, so maybe that's different from what you're using?).

Sorry this is such a mess: I thought I had it at a place where it would just work for people...

@arnicas
Copy link
Author

arnicas commented Feb 15, 2021

Hi - sorry, when I use a server it runs fine. I had gotten out of the habit. If I tried to just load it as a file it errors. So, all good now! Thanks for the hard work and responsiveness!
-Lynn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants