Adding a new line in a textArea with Appcelerator Titanium for iPhone - line

I have tried both Titanium.UI.RETURNKEY_DEFAULT and Titanium.UI.RETURNKEY_NEXT,
but neither will add a new line in the text area. Titanium.UI.RETURNKEY_DEFAULT just closes the keyboard.
I see that there was a related bug report here -
http://jira.appcelerator.org/browse/TIMOB-470?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#issue-tabs
It is marked as fixed, but doesn't seem to have been added to the release I'm working with.
Does anyone have a work around for this?
Thanks!!

Try to add this property to your TextArea:
suppressReturn: false
I tested this with iPhone and can confirm that it works.

Related

Blue border started showing around cell after iOS 13 update, how to get rid off it?

I am going to try be precise about this problem.
I am fixing some old mail application written in objective c long time ago, and it worked pretty fine before this new iOS 13 update.
After that, it starts to show a blue border around body cell (where I have to type message).
I read about focus ring and it seems like same issue, but I was not quite sure because I did not see initialized it anywhere in my code.
Did anybody have a similar issue?
Thanks
It looks like this
I found an answer:
you need to implement these lines in your application:
[self.wkWebView stringByEvaluatingJavaScriptFromString:#"var style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = '*:focus{ outline:none }'; document.getElementsByTagName('head')[0].appendChild(style);"];

cefpython3 (cefwx example2) iCCP: known incorrect sRGB profile

How do i fix or ignore this warning popup? The example works fine, but this warning popup keeps showing. I looked around for a solution and image magic seems to be the fix. However, there are no images causing this problem in the sample code. I'm assuming it is what is being loaded by the browser. Can someone help me solve this problem please?
I can confirm this issue with wx.version=3.0.2.0 msw (classic) and cefpython 31.2. The navigation bar in this example loads three buttons (back, forward, reload) from this directory: c:\Python27\Lib\site-packages\cefpython3\wx\images:
Arrow Left.png
Arrow Right.png
Button Load.png
These cause the "iCCP: known incorrect sRGB profile" error.
Solution: In the c:\Python27\Lib\site-packages\cefpython3\examples\wx\ directory there are three images (back.png, forward.png, reload_page.png). Replace the problematic images with these by renaming them (back.png to Arrow Left.png etc) and copying to the c:\Python27\Lib\site-packages\cefpython3\wx\images directory.
Created Issue #221 to fix this.
If using wx 2.9/3.x you might also encounter text input issue. The cefpython 31.2 release was tested with wx 2.8 only.

Ported OSX Obj-C/CG Screenshot Code to js-ctypes - crash on final line

I ported some objective-c/CoreGraphics code that takes a screenshot of multiple monitors but it's not working. The jsctypes guys won't be able to help because the section is just me answering questions lol
The objc/cg code is from here: https://stackoverflow.com/a/28247749/1828637
My jsctypes type/struct/declares are here: https://github.com/Noitidart/NativeShot/blob/mac-troubleshooting/modules/ostypes_mac.jsm
The jsctypes port is here: https://github.com/Noitidart/NativeShot/blob/mac-troubleshooting/modules/workers/MainWorker.js#L443-656
And the last line is line 643 which causes the crash:
var rez_writeToFile = ostypes.API('objc_msgSend')(data, ostypes.HELPER.sel('writeTofile:atomically:'), myNSStrings.get(OS.Path.join(OS.Constants.Path.desktopDir, 'full_ss.png')), ostypes.CONST.YES);
This coincides with the objectivec of
[data writeToFile:#"/tmp/screenshot.png" atomically:YES];
except i changed path to ...desktop/...png
I wrote to sepearte gists, to align the lines in text diff software to make sure I did everything.
Here is objc/cg: https://gist.github.com/Noitidart/8affcd8bee60d22dcb52
and here is jsctypes: https://gist.github.com/Noitidart/3d4a4e8df625dbea8cc1
I dont think i missed anything i dont know why it crashes on that final line
Do any of the ObjC/CG people see any type definition that is wrong or something that I missed (for example the ObjC code uses compound statments I'm not sure I understood/translated them correctly in the port).
Wowww so after struggling for like some hours then posting this I realize it right away haha
Casing typo in selector!! I had writeTofile:atomically instead of writeToFile:atomically!
If anyone would like to test this out, it's a simple firefox addon test case.
Install an addon that allows installing addons from github repos from here: https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/
Go to commit on this branch that works here: https://github.com/Noitidart/NativeShot/tree/f5f2e8606d3c5c657e901239d3ceb8c8c79a4494
Then click the "Add to Firefox" button at bottom right, below the "Download Zip" button
Click on the toolbar button icon that gets added to firefox, as seen in this screenshot: http://i.imgur.com/n7lSxje.png
Check desktop you now have a single png file with a screenshot of all the monitors, huge props to #KenThomas!

Input.GetAxis("Vertical") returns -1 by default in Unity 4.2

I had a code in Unity UnityScript, it was working in the morning, and I did not change anything.
Now I opened Unity again, it asked "do you want to update Unity?" , I say yes, now it is downloading UnitySetup-4.3.1.exe in Chrome. This may be relevant to the issue.
Anyway, now I ran my code, and noticed something unusual.
changed my code to this :
function Update()
{
Debug.Log(Input.GetAxis("Vertical"));
}
it prints -1, although I'm not pressing anything, or none of my keys are stuck.
I tried restarting Unity. Changing my code back and forth, so it "rebuilds" (hopefully) the application. None of them worked. Maybe there is some other way to refresh the project ?
Has anyone faced an issue like this? Any ideas for a solution?
Thanks for any help !
I know this is super old question but the same issue faced me with Unity 5.3.3f1, just navigate to Edit -> Project Settings -> Inputs
You'll find 4 (Array Element) for both "Vertical" & "Horizontal" 2 each, delete the duplicate ones and you're good to go.
This is expected. As per the documentation here:
The value will be in the range -1...1 for keyboard and joystick input.
If the axis is setup to be delta mouse movement, the mouse delta is
multiplied by the axis sensitivity and the range is not -1...1.
Installing the latest version (4.3.1) and restarting Unity solved the issue..

Xcode error when ctrl-dragging image to new class

I already asked this in the Apple Dev Forum but received no replies, so I'll try here.
I'm unsure if this is a bug or whether I've missed something since I'm still very new to programming.
I have multiple view controllers and have made multiple classes. I have set the custom class "bit" of each view controller to the revelent class. When I ctrl-drag anything from the view to the relevent class header, I get the usual pop-up. I fill in the info, press connect, and BAM. It does the same kind of error whether I choose "Outlet" or "Action" It worked in the previous Xcode but I'm not sure if I've forgotten something.
The view controller and class that I added with Xcode 4 is still working beatifully.
I've tried adding the image manually but all that gave me was a SIGBART error just trying to get to the view. Again, I may have missed something, but I don't think there's much to miss is there?
Any help would be appreciated.
Just to eliminate a few things... I've deleted derived data, restarted Xcode and done a "clean". That's all I can remember that I've done.
Problem solved:
When selecting the implementation file. When I looked in the File Inspector, I found that under "Target Membership", the app name wasn't ticked. I ticked it and it now works well.
Since I didn't need to do that in Xcode 4, I suspect in Xcode 5, it doesn't do that automatically. Maybe that's a bug? I don't know if it was deliberate by Apple, but I think I'll file a bug report anyway since It's a bit of a nuisance.