require statement not working properly with Titanium SDK 8.0.0.GA - titanium

I have a classic titanium app, for some reason the require statement is not working properly
For example:
require("views/Player");
The required file is supposed to modify a global variable, but after requiring it the global variable is not modified.
The weirdest thing that it works fine when compiling against Ti SDK 7.4.2.GA and doesn't work when compiling against any newer version.
Can anyone explain this?

Okay, it turned out that prior to SDK 7.5.0, the app.js would assign any top-level variables to the global object. But not after that.
To fix it, you should declare global variables like this
global.labelText = 'Titanium Doesn't Rock!';
instead of this
var labelText = 'Titanium Doesn't Rock!';
More info here: https://docs.appcelerator.com/platform/latest/#!/guide/Titanium_SDK_7.5.0_Functionality_Update

Related

Minecraft Modding Using Forge: GradleStart is in default package?

My project runs, and I see my mod populating within Minecraft, but for some reason my code doesn't do anything. I followed a basic tutorial that should be adding an item with a texture. I also set some basic method as such within Main to test whether this is working or not:
public void onPlayerTick(TickEvent.PlayerTickEvent tick)
{
System.out.println("testing 123");
}
Upon loading of the world, this doesn't output anything.
Any help?
I think it's working now. I made the dev environment again, this time with a different tutorial from the beginning. The main difference was this tutorial used intellij like me, unlike the other tutorial which used eclipse. Seems to be working because something in the init method printed out something in the format that is expected in the console (meaning it is compiling and using the code properly). So it appears to be working... It seems. I used these tutorials, they were very in depth, would recommend regardless. This is the playlist: https://www.youtube.com/playlist?list=PLxZiPYkNuhkQKH-QlM0C_3-LvjbQA8ZAu

WebStorm Vue Unresolved variable or type

I have upgraded my WebStorm to version 2019.2.1 yesterday.
After that I have some issues with Vuex methods:
Methods and computed added locally works fine and are recognized by WebStorm (green arrows)
But getters and actions are not: Unresolved variable or type... (blue and red arrows)
This is misleading + I can't use shortcut to jump to method.
How can I make it work?
UPDATE
Adding this. before like: changing canBeEdited to this.canBeEdited solves the error but it seems to be a hack (not very comfortable though)
Submitted to developers as WEB-40929, please follow it for updates

abc bytecode decoding failed

I am working on a project in Flex 3.
First off, I should explain I'm learning Flex as I go along. I was tasked with figuring out something and I needed Flex to do it as that is what our UI guys do (I am a database developer and work in PL/SQL and minimal ColdFusion).
What I'm trying to do is create a PDF, and I was able to get this to work on my local machine with a simple program using Flash Builder 4.6. It grabs a snapshot of an object and turns it into a PDF with no issues.
When I move this to Flex 3, I get issues. The error I am getting is:
abc bytecode decoding failed.
I tried to refresh and clean the project per some google searches suggestions, but that did not fix anything.
My code looks like this:
public function pdfBtn_printPDF(event:MouseEvent):void
{
Alert.show("Hello!");
}
Starting with an alert box to verify the function works perfectly. With my full function code or even if I replace it with just the following:
public function pdfBtn_printPDF(event:MouseEvent):void
{
var createPDF:PDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.A4);
}
I get the error above and my project won't work. I am at a loss as to what I am missing. am I creating the variable wrong? If I create it outside of the function it still gives me the decoding error and I have verified that I am creating the variables like other variables inside this project.Any help would be appreciated!!
The issue was I had compiled a library in Flash 4.6 and it wasn't compatible with Flex 3. It is working now with a new library.

Can't see what is inside object - Xcode debugger

I can't see object variables in Xcode debugger. I haven't changed anything in Build Setting. This happend to me after Xcode update and I can only print description.
Here is a screenshot displaying what I mean:
And this is what should by displayed in object:
Most likely the variable is outside the current scope. Current scope being the scope where the debugger is currently stopped.
So calling a method on the pointer to the object (which is what happens when the description is printed) will work, as you can access any memory, but the variable view might be limited to only the current scope.
It was probably bug in Xcode. With new version of Xcode it is working properly. Thank you everyone for answering

Can't always set React Native breakpoints in Chrome

While debugging my React Native app in Chrome, I'm often unable to set breakpoints in the Sources tab. When I click on a line of code to add the breakpoint, a breakpoint is added instead to the next function declaration line in my module.
This doesn't happen in all of my source modules, but often enough that it prevents me from debugging efficiently.
I'm currently using RN 0.22 but this has been happening on older versions of RN as well (e.g. RN 0.18).
This problem maybe caused by babel. When use normal function and arrow function together, it happened.
"sourceMaps": "inline" in .babelrc fixed this for me.
I've only experienced this issue under the following conditions:
1) The .js file contains multiple functions, and
2) Attempting to set a breakpoint within a function that is not the last function in the .js file
So, a partial workaround is to move a function such that it is the last function in the .js file. Or, you could assign a single function per file. Either way, you will be able to set breakpoints.
This is far from ideal, but it's the only "solution" I've found so far.
I had the same issue, and I have a cozy solution for now :
I put the word "debugger" in the file which I want to debug.
I refresh the browser to see that it stops.
after it stops, I can add as much as breakpoints as I want and remove the "debugger" word from file
Try this package
https://www.npmjs.com/package/react-breakpoint-fix
just install the package and run react-breakpoint-fix from the terminal.
This fixed it for me. I'm using react-scripts#3.x