How to get constraints back after shutting off autolayout? - autolayout

I am relatively new to coding on Swift and Xcode. When I was attempting to fix the design of my app, I unchecked the "Use Auto Layout" button assuming that it would simply shut off auto layout for that specific entity (An MKMapView in this situation):
Unfortunately, this removed all the constraints that I had for the entire app! I quickly tried to revert my changes by rechecking the box but it did not return to normal. Are all my constraints gone forever or is there a way to recover them?
Unfortunately, my repository is slightly out of date and I would lose a lot of work if I were to reset with the most current version saved. Any help would be amazing and really end the extreme amount of stress I just placed on myself. Thank you!

Sadly, your constraints are probably gone. Unchecking this box removes all constraints.
If you did not close and open your project since unchecking the box, you can try and undo the change, it will revert to the previous state if the conditions are ideal.

Related

Hiding objects in unity without changing their state

I have a vague memory of a Unity video tutorial where the guy hid some objets while building a scene. The thing is that he dind't use the usual 'disable/enable the object via the inspector checkbox' and so he didn't have to worry to enable them later... moreover, as the objects were 'invisible but enabled', all attached behaviours were working.
As far as I remember the effect was pretty similar to moving the object into a hidden layer (but not changing the object layer but using a different Unity built-in action so he actually dind't change anything in the object).
I've been trying to remember how he did such a thing and looking around the editor to find the specific option but with no luck. Honestly, I'm beginnig to think that I might not be remembering correctly. Do anyone know about this 'hide objects without changing them' command?
Regards!
Sounds like he might have just turned the object's renderer off. Each GaneObject is going to have some kind of renderer as a property in the inspector (sprite renderer if its 2D, ect). He probably just disabled that as opposed to disabling the entire GameObject. Let me know if that helps!
I've just received by chance a link to a video on twitter (I think it's the very same I was trying to remember but I'm not 100% sure). Anyway it seems that my current Unity version 2018.3.3) doesn't include that 'Scene visibility' toggle; it seems to be available for 2019 Beta. . I didn't test it yet but it seems pretty straightforward, just click on a gray bar in the hierarchy bar, to the left of the object you want to 'hide'; the bar seems to work as a an visible/not visible toggle. Here a link to de video where you can see the thing working!
I hope it helps!!

qt creator unwanted disassembly

I had this very annoying problem that while debugging, suddenly it started to show the disassembled code rather than the C++ code, via google I found several with the same problem, and a suggested weird solution here which I'm not sure how to interpret. I tried things similar to that post and found a solution:
Shut down and restart QT Creator
In left-hand tab "Projects", untick then re-tick "Shadow build"
Seems like voodoo right? But I noticed that step 1 clears all breakpoints, and step 2 temporarily changes some paths after which it says "evaluating" for a second in the lower right corner. So perhaps it's not as weird as it sounds, apparently a few things are cleared during this process.
I don't think I'm supposed to write answers to my own problems here but I thought it would be a waste not to post this solution to this very annoying problem that apparently more than I have encountered. The next guy hopefully finds my post.
I cant post links to others with similar problems since I need a higher reputation then.. :-/
It probably helps if you uncheck options to break debugging on Thread creation and Thread exit if you have these options checked for the Debugger. These options will certainly pop the disassembler view up when you start debugging even if you haven't set any Breakpoints in your code. You find these options in menu Tools/Debugger/CDB. If you want to break on C++ exceptions leave that option checked, otherwise uncheck that too.

Element preservation bug in Meteor app

I've made a watch-as-I-type real-time chat service in Meteor, but I'm having trouble with the built-in element preservation feature in Meteor. Basically, I need the current chat message div to not be updated while the text input in it has focus. The documentation has the following instructions:
Another thorny problem in hand-written applications is element
preservation. Suppose the user is typing text into an element,
and then the area of the page that includes that element is redrawn.
The user could be in for a bumpy ride, as the focus, the cursor
position, the partially entered text, and the accented character input
state will be lost when the is recreated.
This is another problem that Meteor solves automatically. Just make
sure that each of your focusable elements either has a unique id, or
has a name that is unique within the closest parent that has an id.
Meteor will preserve these elements even when their enclosing template
is rerendered, but will still update their children and copy over any
attribute changes.
Following these directions, I set a unique id for my input field to make sure it doesn't get re-rendered while I'm typing in it. But now I'm facing the following two problems:
The other person's chat message updates as they type, but this update pauses while I'm typing in my own message. As soon as I stop typing (even if my input field has focus), their message starts getting updated again.
When a new message is created and its div is inserted, my message gets updated / re-rendered even if its input field has focus. This causes it to lose focus suddenly.
You can test this out with two different computers/users in the same chat room at http://babble.im.
Is this a bug in the Meteor code, or my own? How can I find out?
Edit:
Ah, I think I found the reason for the first problem:
Meteor normally batches up any needed updates and executes them only
when your code isn't running. That way, you can be sure that the DOM
won't change out from underneath you. Sometimes you want the opposite
behavior. For example, if you've just inserted a record in the
database, you might want to force the DOM to update so you can find
the new elements using a library like jQuery. In that case, call
Meteor.flush to bring the DOM up to date immediately.
I guess my code was running while the user was typing, so the DOM wasn't being updated. I'll try to use Meteor.flush to fix it. Now what's up with the second problem?
The reason for the first issue is that Meteor used to freeze all changes to your local database cache while any methods were in flight. Meteor 0.5.1 improved this to only freeze changes to the documents that you were modifying locally. I suspect that Meteor 0.5.1 fixes this. See http://meteor.com/blog/2012/11/19/latency-compensation-improvements-coming-soon-in-meteor-051 for more information.
The second issue is probably addressed by the preserve-inputs package added in Meteor 0.4.2, but it's hard to be sure without more details.
I'd love to know if your problems still exist in current versions of Meteor!

Flex - invisible text until mouse pointer moves outside textInput

We have an application running flex sdk 4.5 and have recently encountered an issue with textInput fields which we have not been able to reproduce on our end for the better part of a month now.
Here are the symptoms:
Users opens an input form which contains several input fields (combo boxes, calendars, text inputs, etc)
User clicks inside a text field
Users types (obviously!)
** Nothing appears in the text input - we have validators on some of these fields and they do kick in properly (ie. user sees red box around textInput disappearing)
User moves cursor outside of text input field and text appears
Give or take, this is the test case we've been provided. We have been unable to reproduce this and I'm reaching out to see if anybody has heard of issues like this in the past.
They are running our flex application in the following environment:
Windows XP SP3
IE 7.0.5730.13 (locale = en-gb)
Flash Player 10.3.181.14
Upgrading either of these components is not an option. Installing the flash player debugger is not an option either.
Now we've setup a pc exactly the same way as they have on their end and still haven't reproduced. So we're really stuck at this point :)
Any suggestion is greatly appreciated. I'll provide any additional info needed.
-Marc
Feb. 2nd 2012 - Update
As I noted in my comment reply to shaun, it seems our customer was more or less precise in their description of the issue. We ran a webex session with them this morning and actually saw the issues first hand.
Here's what happens:
- User loads our application via its url
- User is able to input data and pretty much do any function for a 'random' time period
- All of a sudden, the issues start (there are more symptoms than just the one I originally mentioned):
1. Users type in text input fields and they won't see the text appear until they move the cursor out of / into any other component (could be entering an hbox, exiting a text input field, etc)
2. Combo boxes behave more or less the same. They can drop them down, but then the mouse wheel no longer refreshes the list. It actually scrolls in the background, but until the user moves the mouse, the list does not refresh
3. We also communicate between the server and client via an amf channel. The events make it to the client, but again, they won't see the screen refresh until they move their cursor.
So basically, the application still seems to work, but the screen is no longer refreshing. Could it be something to do with an invalidate / update of the display list that doesn't kick in? We'd like to get them to install the debugger version of FP, but that doesn't seem to be an option.
Another thing to keep in mind: they have a VERY bad internet connection. They average around 1-1.5mbps (megabits) which is enough for our app, but I just thought I'd let you know.
We learned that they also use a Citrix presentation layer to deploy IE 7 to the end users. We've received confirmation from the end user that even if they launch IE on their workstation (not through citrix), they get the issue also.
Another note is that we've seen no errors in our web server, jboss or application logs...
So that's the update I've got... anyone have more thoughts on this? We've more or less discarded the fonts being an issue at this point since the issue affects more than just 'fonts'. Is everything on the screen not updating anymore.

Cursor through html in VS lags

If I have a decent size asp.net page open in Source view, and hold down the Up key or Down key to scroll through it, it will periodically get "stuck". It will stop on a line for a few microseconds, and you can see the screen flash, like it's trying to catch up with what it's trying to do behind the scenes. In my two-monitor setup, I'm working in monitor 2, and you can see the icons on the desktop on monitor 1 flash. It's annoying because I invariable overstep lines and have to move back and forth, constantly correcting for the lag. Any idea what it's doing as I cursor through the code? Anything I can turn off to stop this from happening? (Slowing down my key repeat rate is not an option.)
It's possibly the property pane - this was a big issue in VS2005, and VS2005SP1 not only added a feature to turn this off, but turned it off by default, however it looks like they've removed the option to turn it off in VS2008.
Scott Guthrie had a post on HTML Source Editing Performance in VS2005 SP1.
Closing the property pane may well solve the issue if you don't really use it all that much.

Resources