Bad docs makes me want to move back to 100% native

I have try to follow this:


and this:
https://www.fusetools.com/docs/native-interop/foreign-code

An all i get is “Module not found”

I truly believe in fuse so much that I’m willing to develop a full production app but the lack of documentation is hurting me so much that I don’t think is worth the time and effort.

I have an app that needs to get out to market in less than 3 months and is only a simple calendar with some logic and I don’t seem to find any answers around here.

FYI.
The Date() on JS doesn’t work that well.
If I do this:
var dt = new Date(“2016-09”); //I get what I need which is ‘31 3’ but if I use something like this
var frstdt = new Date();
var scnddt = new Date(frstdt.getFullYear()+"-"+frstdt.getDate()); //this throws ‘1 5’ or something like that

The code above is the only reason why I need to use foreign code.

Fuse doesn’t change the way JavaScript works, they only create their own JavaScript libraries to provide things, that are needed to interact with the OS. Like the Camera api.

To learn about the Date object, look up “how to use the Date object in JavaScript” not specific to Fuse. It’s just how the Date object works in JavaScript in general: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

If you could be more specific with your problem, I’m sure they’ll be people who can help. I love JavaScript and sure I can figure out what you want to do with the Date object.

If anything you could use momentJS (That I’m not too familiar with but the API makes it really easy to manipulate dates in JS)

If you’re on the Fuse slack team I’m under @edwin and will be happy to help whenever I’m on slack btw.

I’ve used Javascript for over 5 years and I need to be able to get some basic stuff for my app.

I need a calendar view on my app and sense I don’t understand the Foreign code completely I was going to make one using custom view and some JS on the back end to implement the days of the week.

The big issue is that not every month ends on the 31st and every month starts on any given day of the week.

I need to:

  1. Check whats the last day of the month and the first day.
  2. Which day of the week starts and ends.

After I get this I can continue working with my app. It may sound stupid for someone else but for me its crucial sense its a production app for a “really Big Company” and is releasing in 3 months.

I already have most of the UI done with some animations (Some animations triggers did not worked at all, but that’s in another thread) and show the clients how it looks and they love it.

At the end… I just need a Calendar View

Javier

“If anything you could use momentJS (That I’m not too familiar with but the API makes it really easy to manipulate dates in JS)”

Will this Lib run on Fuse?

Hi, sorry to hear you’re having trouble.

Was this your issue? If so, I’ve followed up there; please respond so we can help you out :slight_smile:

Where specifically in the docs can we make things easier for you? I’d love to hear any specific ideas you have that could help us make things better for you.

As for the calendar view, if you want to make one using a Grid with data from JS for example, as edwin mentioned, moment.js is quite good and I’d recommend that. Yes, it does work with Fuse, and I’m fairly certain its API will give you what you need :slight_smile:

If you’re after a native calendar view, foreign code is the way to go. I’d suggest taking a look at our working with foreign code and custom native controls articles in addition to the video/documentation you already found.

Thanks for you reply:

For me, Docs are the most important part of a framework. Assuming that “WE the developers”, can understand everything from the docs is a dangerous game to play.

Docs are the “Best Customer Service” any of you on Fuse (and me on affiBox) can provide. I have ended numerous contracts or Projects with other frameworks just because of bad docs.

Having said this. I love Fuse and I truly believe in what it can accomplish.
But for example: This https://www.fusetools.com/docs/native-interop/foreign-code or this https://www.fusetools.com/docs/native-interop/native-ux-components are not that clear or are hard to follow and understand because there is no step by step. Like you said on Git, “I realize that may not have been clear from the video or the docs it linked to; perhaps that’s something we can fix.”

Small steps like that can take hours of work and cost money. And using frameworks is all about saving $$.

I’m not mad and I see that you guys are fast at answering and I like that. I’m just frustrated that it has taken so long to implement something so simple and that I’m not able to find “straight” answers around here.

Anyway. I’ll be implementing what you send over Git and I’ll get back to you.

Regards
Javier

Thanks for the feedback! You’re absolutely right that docs are a very important part of a piece of software’s offering. As we’re a small team, we’re working hard to prioritize which parts of documentation we work on and that tends to be the most public-facing parts of our product, which sometimes can mean other pieces of documentation get put on the back-burner a bit. It’s unfortunate that these are the parts you ran into specifically.

That said, we’re always working towards simplifying and streamlining the docs, and cases like these are very helpful to us in that process. As we’re still in beta, there will be kinks we need to work out, but I appreciate your patience and kind words as we chug through these issues, so thanks for that :slight_smile:

Yeah, it’s hard to bring across sometimes just how tight a ship we run here in terms of how much time we have to delegate, especially on docs. There’s just not a lot of us and so much to do! Believe me, Javier, we share your frustrations internally at times too, and docs are a constant discussion.

Not making excuses here, but since Fuse is in actual beta, not marketing-beta, we really depend on a trade of patience at times :slight_smile: We need you guys to continuously push us in the right direction, and in turn we want to give you the best work we can do to help you get where you want to be. This push-pull and friction as we go is what makes and will continue to make Fuse great <3

So, I try this: “To add an uno file, simply create an empty text file with the .uno extension in your project folder, and adding it to Includes array in the project file (.unoproj). The entry should be in the format “:SourceFile”.”

Did not worked at all.

Also this: “Alternatively type fuse create uno . This will automatically create an uno file with a template, and add it to the project.”

It did created the file but it did not added to the ‘Includes’ section on the .unoproj file.

What Am I missing?

Fuse 0.24.0 (build 7243)
C:\Users\jcbar\Desktop\affibox\Fuse\PlaytexApp\PlaytexApp.unoproj(9.35): E0000: Invalid ‘Includes’ element (SystemSounds:SystemSounds.Uno): Invalid file type (SystemSounds.Uno)
fuse: Failed to load project ‘C:\Users\jcbar\Desktop\affibox\Fuse\PlaytexApp\PlaytexApp.unoproj’: Failed to parse project.

C:\Users\jcbar\Desktop\affibox\Fuse\PlaytexApp\PlaytexApp.unoproj(9.35): E0000: Invalid ‘Includes’ element (SystemSounds:SystemSounds.Uno): Invalid file type (SystemSounds.Uno)
Press any key to exit.

Fuse 0.24.0 (build 7243)
Build started: FullCompile
Configuring
C:\Users\jcbar\Desktop\affibox\Fuse\PlaytexApp\SystemSounds.Uno(8.2): E3114: There is no identifier named ‘UXGlobalModuleAttribute’ accessible in this scope. Did you mean ‘UXGlobalModuleAttribute’ (as in Uno.UX.UXGlobalModuleAttribute)? For example, try adding ‘using Uno.UX;’ to the top of the code file. Could you be missing a package reference?
C:\Users\jcbar\Desktop\affibox\Fuse\PlaytexApp\SystemSounds.Uno(8,3,8,17): Error E3114: There is no identifier named ‘UXGlobalModuleAttribute’ accessible in this scope. Did you mean ‘UXGlobalModuleAttribute’ (as in Uno.UX.UXGlobalModuleAttribute)? For example, try adding ‘using Uno.UX;’ to the top of the code file. Could you be missing a package reference?

Build completed in 2.79 seconds
1 error
Build ended
fuse: Failed to compile project
Press any key to exit.

FYI: This information is misleading "Adding uno-files to a project

To add an uno file, simply create an empty text file with the .uno extension in your project folder, and adding it to Includes array in the project file (.unoproj). The entry should be in the format “:SourceFile”."

This: “:SourceFile” makes me want to think that I have literally add my uno file like this
“:SystemSounds.uno”

After hacking around I just added this in the Includes section: “SystemSounds.uno” but this causes an error on the preview.“Module not found”

I went to git to see If I’m missing something but guess what?
“{
“RootNamespace”:”",
“Packages”: [
“Fuse”,
“FuseJS”
],
“Includes”: [
“*”
]
}"

The .unoproj file dosen’t show how to add the .uno files either

Help Please?

Cloning the Git example worked fine. But I just don’t get it. Why It wont work on my own project?

file

Could you please post your individual questions in separate threads. That makes it easier to address them and also for others to find answers for.

file

Anders Bondehagen wrote:

Could you please post your individual questions in separate threads. That makes it easier to address them and also for others to find answers for.

Sorry Sir. I’m using the same thread because its all related to the Docs

I can see that you were able to figure this out on github. Glad you were able to get it working! I’ll be sure to go over that section of the docs soon. I’ve already made tickets on it internally. Thanks again for reporting.

Sorry Sir. I'm using the same thread because its all related to the Docs

I can see how that somehow seems logical, but unfortunately it is not practical for anyone, so please follow Anders’ suggestion above and create relevant threads and keep each issue separate. That makes it much easier to keep track of and for people to help you :slight_smile: